#include <stdio.h>

char c;

int main() {
	while (1) {
		scanf("%c", &c);
		
		if (c=='#') break;

		switch(c) {
			case ' ':
				printf("%%20"); break;
			case '!':
				printf("%%21"); break;
			case '$':
				printf("%%24"); break;
			case '%':
				printf("%%25"); break;
			case '(':
				printf("%%28"); break;
			case ')':
				printf("%%29"); break;
			case '*':
				printf("%%2a"); break;
			default:
				printf("%c", c);
		}
	}

	return 0;
}
